<div class="task">
<?php include ('buttons.tpl'); ?>
</div>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<h2><?php echo $heading_title; ?></h2>
<div class="description"><?php echo $heading_description; ?></div>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tabs">
	<ul>
	  <li><a href="#tabs-1"><?php echo $tab_general; ?></a></li>
	  <li><a href="#tabs-2"><?php echo $tab_columnizer; ?></a></li>
	</ul>
	<div id="tabs-1">
      <table>
        <tr>
          <td width="185"><?php echo $entry_status; ?></td>
          <td><select name="featured_status">
              <option value="1" <?php echo (@$featured_status)?'selected="selected"':''?>><?php echo $text_enabled; ?></option>
              <option value="0" <?php echo (!@$featured_status)?'selected="selected"':''?>><?php echo $text_disabled; ?></option>
            </select></td>
        </tr>
        <tr>
          <td><?php echo $entry_limit; ?></td>
          <td width="200"><input type="text" name="featured_limit" value="<?php echo @$featured_limit; ?>" size="3" />
          </td>
        </tr>
        <tr>
          <td><?php echo $entry_atc; ?></td>
          <td>
            <input type="radio" name="featured_atc" value="1"<?php echo (@$featured_atc)?' checked="checked"':''?>>
            <?php echo $text_yes; ?>
            <input type="radio" name="featured_atc" value="0"<?php echo (!@$featured_atc)?' checked="checked"':''?>>
            <?php echo $text_no; ?>
            </td>
        </tr>
        <tr>
          <td><?php echo @$entry_max_desc; ?></td>
          <td width="200"><input type="text" name="featured_max_desc" value="<?php echo @$featured_max_desc; ?>" size="4" /></td>
          <td class="help"><?php echo $help_max_desc; ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_image_size; ?></td>
          <td>
            <?php echo $entry_image_width; ?>
            <input type="text" name="featured_image_width" value="<?php echo @$featured_image_width; ?>" size="4" />
            <?php echo $entry_image_height; ?>
            <input type="text" name="featured_image_height" value="<?php echo @$featured_image_height; ?>" size="4" />
          </td>
        </tr>
        <tr>
          <td><?php echo $entry_products; ?></td>
          <td width="200">
		    <select name="featured_products[]" multiple="multiple">
		    <?php foreach ($products as $product) { ?>
		    <option value="<?php echo $product['product_id']?>"<?php echo in_array($product['product_id'],(@$featured_products)?@$featured_products:array())?' selected="selected"':'';?>><?php echo $product['name']?></option>
	        <?php } ?>
	        </select>
          </td>
        </tr>
      </table>
    </div>
    <div id="tabs-2">
        <table>
          <tr>
            <td width="185"><?php echo $entry_columnizer; ?></td>
        	<td><select name="featured_columnizer">
              <option value="1" <?php echo (@$featured_columnizer)?'selected="selected"':''?>><?php echo $text_yes; ?></option>
              <option value="0" <?php echo (!@$featured_columnizer)?'selected="selected"':''?>><?php echo $text_no; ?></option>
            </select></td>
          </tr>
          <tr>
            <td><?php echo $entry_cpr; ?></td>
            <td width="200"><input type="text" name="featured_cpr" value="<?php echo @$featured_cpr; ?>" size="4" /></td>
            <td class="help"><?php echo $help_cpr; ?></td>
          </tr>
      	</table>
      </fieldset>
    </div>
  </div>
  <script type="text/javascript"><!--
	$(function() {
		$("#tabs").tabs();
	});
  //--></script>
</form>
